Optimal. Leaf size=108 \[ \frac {e (2 B d+A e) x}{c}+\frac {B e^2 x^2}{2 c}+\frac {\left (A c d^2-2 a B d e-a A e^2\right ) \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{\sqrt {a} c^{3/2}}+\frac {\left (B c d^2+2 A c d e-a B e^2\right ) \log \left (a+c x^2\right )}{2 c^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 108, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {815, 649, 211,
266} \begin {gather*} \frac {\text {ArcTan}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right ) \left (-a A e^2-2 a B d e+A c d^2\right )}{\sqrt {a} c^{3/2}}+\frac {\log \left (a+c x^2\right ) \left (-a B e^2+2 A c d e+B c d^2\right )}{2 c^2}+\frac {e x (A e+2 B d)}{c}+\frac {B e^2 x^2}{2 c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 266
Rule 649
Rule 815
Rubi steps
\begin {align*} \int \frac {(A+B x) (d+e x)^2}{a+c x^2} \, dx &=\int \left (\frac {e (2 B d+A e)}{c}+\frac {B e^2 x}{c}+\frac {A c d^2-2 a B d e-a A e^2+\left (B c d^2+2 A c d e-a B e^2\right ) x}{c \left (a+c x^2\right )}\right ) \, dx\\ &=\frac {e (2 B d+A e) x}{c}+\frac {B e^2 x^2}{2 c}+\frac {\int \frac {A c d^2-2 a B d e-a A e^2+\left (B c d^2+2 A c d e-a B e^2\right ) x}{a+c x^2} \, dx}{c}\\ &=\frac {e (2 B d+A e) x}{c}+\frac {B e^2 x^2}{2 c}+\frac {\left (A c d^2-2 a B d e-a A e^2\right ) \int \frac {1}{a+c x^2} \, dx}{c}+\frac {\left (B c d^2+2 A c d e-a B e^2\right ) \int \frac {x}{a+c x^2} \, dx}{c}\\ &=\frac {e (2 B d+A e) x}{c}+\frac {B e^2 x^2}{2 c}+\frac {\left (A c d^2-2 a B d e-a A e^2\right ) \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{\sqrt {a} c^{3/2}}+\frac {\left (B c d^2+2 A c d e-a B e^2\right ) \log \left (a+c x^2\right )}{2 c^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 99, normalized size = 0.92 \begin {gather*} \frac {c e x (4 B d+2 A e+B e x)-\frac {2 \sqrt {c} \left (-A c d^2+2 a B d e+a A e^2\right ) \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{\sqrt {a}}+\left (B c d^2+2 A c d e-a B e^2\right ) \log \left (a+c x^2\right )}{2 c^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.73, size = 97, normalized size = 0.90
method | result | size |
default | \(\frac {e \left (\frac {1}{2} B e \,x^{2}+A e x +2 B d x \right )}{c}+\frac {\frac {\left (2 A c d e -B \,e^{2} a +B c \,d^{2}\right ) \ln \left (c \,x^{2}+a \right )}{2 c}+\frac {\left (-A a \,e^{2}+A c \,d^{2}-2 a B d e \right ) \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c}}}{c}\) | \(97\) |
risch | \(\frac {B \,e^{2} x^{2}}{2 c}+\frac {e^{2} A x}{c}+\frac {2 e B d x}{c}+\frac {\ln \left (-a^{2} A \,e^{2}+A \,d^{2} a c -2 B \,a^{2} d e -\sqrt {-a c \left (A a \,e^{2}-A c \,d^{2}+2 a B d e \right )^{2}}\, x \right ) A d e}{c}-\frac {a \ln \left (-a^{2} A \,e^{2}+A \,d^{2} a c -2 B \,a^{2} d e -\sqrt {-a c \left (A a \,e^{2}-A c \,d^{2}+2 a B d e \right )^{2}}\, x \right ) B \,e^{2}}{2 c^{2}}+\frac {\ln \left (-a^{2} A \,e^{2}+A \,d^{2} a c -2 B \,a^{2} d e -\sqrt {-a c \left (A a \,e^{2}-A c \,d^{2}+2 a B d e \right )^{2}}\, x \right ) B \,d^{2}}{2 c}+\frac {\ln \left (-a^{2} A \,e^{2}+A \,d^{2} a c -2 B \,a^{2} d e -\sqrt {-a c \left (A a \,e^{2}-A c \,d^{2}+2 a B d e \right )^{2}}\, x \right ) \sqrt {-a c \left (A a \,e^{2}-A c \,d^{2}+2 a B d e \right )^{2}}}{2 c^{2} a}+\frac {\ln \left (-a^{2} A \,e^{2}+A \,d^{2} a c -2 B \,a^{2} d e +\sqrt {-a c \left (A a \,e^{2}-A c \,d^{2}+2 a B d e \right )^{2}}\, x \right ) A d e}{c}-\frac {a \ln \left (-a^{2} A \,e^{2}+A \,d^{2} a c -2 B \,a^{2} d e +\sqrt {-a c \left (A a \,e^{2}-A c \,d^{2}+2 a B d e \right )^{2}}\, x \right ) B \,e^{2}}{2 c^{2}}+\frac {\ln \left (-a^{2} A \,e^{2}+A \,d^{2} a c -2 B \,a^{2} d e +\sqrt {-a c \left (A a \,e^{2}-A c \,d^{2}+2 a B d e \right )^{2}}\, x \right ) B \,d^{2}}{2 c}-\frac {\ln \left (-a^{2} A \,e^{2}+A \,d^{2} a c -2 B \,a^{2} d e +\sqrt {-a c \left (A a \,e^{2}-A c \,d^{2}+2 a B d e \right )^{2}}\, x \right ) \sqrt {-a c \left (A a \,e^{2}-A c \,d^{2}+2 a B d e \right )^{2}}}{2 c^{2} a}\) | \(608\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.57, size = 99, normalized size = 0.92 \begin {gather*} \frac {{\left (A c d^{2} - 2 \, B a d e - A a e^{2}\right )} \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c} c} + \frac {B x^{2} e^{2} + 2 \, {\left (2 \, B d e + A e^{2}\right )} x}{2 \, c} + \frac {{\left (B c d^{2} + 2 \, A c d e - B a e^{2}\right )} \log \left (c x^{2} + a\right )}{2 \, c^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.38, size = 231, normalized size = 2.14 \begin {gather*} \left [\frac {4 \, B a c d x e + {\left (A c d^{2} - 2 \, B a d e - A a e^{2}\right )} \sqrt {-a c} \log \left (\frac {c x^{2} + 2 \, \sqrt {-a c} x - a}{c x^{2} + a}\right ) + {\left (B a c x^{2} + 2 \, A a c x\right )} e^{2} + {\left (B a c d^{2} + 2 \, A a c d e - B a^{2} e^{2}\right )} \log \left (c x^{2} + a\right )}{2 \, a c^{2}}, \frac {4 \, B a c d x e + 2 \, {\left (A c d^{2} - 2 \, B a d e - A a e^{2}\right )} \sqrt {a c} \arctan \left (\frac {\sqrt {a c} x}{a}\right ) + {\left (B a c x^{2} + 2 \, A a c x\right )} e^{2} + {\left (B a c d^{2} + 2 \, A a c d e - B a^{2} e^{2}\right )} \log \left (c x^{2} + a\right )}{2 \, a c^{2}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 425 vs.
\(2 (105) = 210\).
time = 0.77, size = 425, normalized size = 3.94 \begin {gather*} \frac {B e^{2} x^{2}}{2 c} + x \left (\frac {A e^{2}}{c} + \frac {2 B d e}{c}\right ) + \left (- \frac {- 2 A c d e + B a e^{2} - B c d^{2}}{2 c^{2}} - \frac {\sqrt {- a c^{5}} \left (A a e^{2} - A c d^{2} + 2 B a d e\right )}{2 a c^{4}}\right ) \log {\left (x + \frac {2 A a c d e - B a^{2} e^{2} + B a c d^{2} - 2 a c^{2} \left (- \frac {- 2 A c d e + B a e^{2} - B c d^{2}}{2 c^{2}} - \frac {\sqrt {- a c^{5}} \left (A a e^{2} - A c d^{2} + 2 B a d e\right )}{2 a c^{4}}\right )}{A a c e^{2} - A c^{2} d^{2} + 2 B a c d e} \right )} + \left (- \frac {- 2 A c d e + B a e^{2} - B c d^{2}}{2 c^{2}} + \frac {\sqrt {- a c^{5}} \left (A a e^{2} - A c d^{2} + 2 B a d e\right )}{2 a c^{4}}\right ) \log {\left (x + \frac {2 A a c d e - B a^{2} e^{2} + B a c d^{2} - 2 a c^{2} \left (- \frac {- 2 A c d e + B a e^{2} - B c d^{2}}{2 c^{2}} + \frac {\sqrt {- a c^{5}} \left (A a e^{2} - A c d^{2} + 2 B a d e\right )}{2 a c^{4}}\right )}{A a c e^{2} - A c^{2} d^{2} + 2 B a c d e} \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.35, size = 101, normalized size = 0.94 \begin {gather*} \frac {{\left (A c d^{2} - 2 \, B a d e - A a e^{2}\right )} \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c} c} + \frac {{\left (B c d^{2} + 2 \, A c d e - B a e^{2}\right )} \log \left (c x^{2} + a\right )}{2 \, c^{2}} + \frac {B c x^{2} e^{2} + 4 \, B c d x e + 2 \, A c x e^{2}}{2 \, c^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.14, size = 114, normalized size = 1.06 \begin {gather*} \frac {x\,\left (A\,e^2+2\,B\,d\,e\right )}{c}+\frac {\ln \left (c\,x^2+a\right )\,\left (-4\,B\,a^2\,c^2\,e^2+4\,B\,a\,c^3\,d^2+8\,A\,a\,c^3\,d\,e\right )}{8\,a\,c^4}-\frac {\mathrm {atan}\left (\frac {\sqrt {c}\,x}{\sqrt {a}}\right )\,\left (-A\,c\,d^2+2\,B\,a\,d\,e+A\,a\,e^2\right )}{\sqrt {a}\,c^{3/2}}+\frac {B\,e^2\,x^2}{2\,c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________